#ifndef CENTRALWIDGETCONTAINER_H
#define CENTRALWIDGETCONTAINER_H
#include <QWidget>
#include "../terminalglobals.h"

namespace ExecTerminalImplNS
{
    //assume that CentralWidgetContainer has only zero or one child
    class CentralWidgetContainer: public QWidget
    {
    public:
        CentralWidgetContainer(QWidget * parent);
        QWidget * centralWidget()const;
        void setCentralWidget(QWidget *);//deletes old cental widget
        Position position()const { return thePosition; }
        void setPosition(Position pos);
        void switchPosition();

    protected:
        void paintEvent(QPaintEvent *);
        void resizeEvent(QResizeEvent *);

    private:
        void layoutCentralWidget();

    private:
        Position thePosition;
    };
}

#endif

